<!--
/**
 * Copyright (c) 2010 Aurélien Chabot
 * Licensed under the GNU General Public License v3, read LICENSE
 *
 * This file is part of Gtalk & Facebook Chat Extension.
 *
 * "Gtalk & Facebook Chat Extension" is free software: you can redistribute
 * it and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * "Gtalk & Facebook Chat Extension" is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with "Gtalk & Facebook Chat Extention".
 * If not, see <http://www.gnu.org/licenses/>.
 */
  -->
<!DOCTYPE html >
<html lang="fr">
	<head>
		<title>Popup</title>
		<meta charset="UTF-8" />
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
		<script src="js/common.js" type="text/javascript"></script>
		<script src="js/log.js" type="text/javascript"></script>
		<script type="text/javascript">
			jQuery(document).ready(function() {

				$('h2#title').text( chrome.i18n.getMessage('extName') );
				$('#activateFacebookLabel').text( chrome.i18n.getMessage('activateFacebook') );
				$('#activateGtalkLabel').text( chrome.i18n.getMessage('activateGtalk') );

				var options;

				function restoreOptions() {
					options = loadOptions();

					$('#activateGtalk:checkbox')[0].checked = options.activateGtalk;
					$('#activateFacebook:checkbox')[0].checked = options.activateFacebook;

				}

				function saveOptions() {

					options.activateGtalk = $('#activateGtalk:checkbox')[0].checked;
					options.activateFacebook = $('#activateFacebook:checkbox')[0].checked;

					saveCommonOptions(options);
					sendOptions(options);

				}

				restoreOptions();
				$(':checkbox').change(saveOptions);
			});

		</script>
		<style type="text/css">
			body {
				width: 15em;
				min-width:357px;
				overflow-x:hidden;
				padding: 0;
				font-family: Arial,sans-serif;
				font-size: 0.8em;
			}
			h2 { font-size: 0.9em; border-bottom: 1px solid #bbb; }
			#footer { font-size: 8pt; text-align: right; }
			#siteDomain { color: #0e774a; }
			#option { margin: 4px 15px;}
			hr { height: 0; border-style: none; border-top: 1px solid #bbb; margin: 0.7em }

		</style>
	</head>
	<body>
		<h2 id="title"></h2>
		<div id="option">

			<input type="checkbox" name="activateGtalk" id="activateGtalk" />
			<label for="activateGtalk" id="activateGtalkLabel"></label>

			<br />

			<input type="checkbox" name="activateFacebook" id="activateFacebook" />
			<label for="activateFacebook" id="activateFacebookLabel"></label>

		</div>

		<p id="footer"><a href="options.html" target="_blank">More options</a></p>

	</body>
</html>
